---
description: Hasura Relay GraphQL API reference
keywords:
  - hasura
  - docs
  - GraphQL API
  - reference
  - relay
slug: index
---

import GraphiQLIDE from '@site/src/components/GraphiQLIDE';

# Relay GraphQL API Reference

## Introduction

All GraphQL requests for Relay queries are made to the Relay GraphQL API.

## Endpoint

All requests are `POST` requests to the `/v1beta1/relay` endpoint.

## Request types

The following types of requests can be made using the Relay GraphQL API:

- [Query / Subscription](/api-reference/relay-graphql-api/query.mdx)
- [Mutation](/api-reference/relay-graphql-api/mutation.mdx)

## Batching requests

The Relay GraphQL API provides support for batched requests over the
`/v1beta1/relay` endpoint.

**Example:** using a client which supports batching (such as Apollo
Client), we can send two query operations in one request:

<GraphiQLIDE
  query={`query first {
  author_connection(where: {id: {_eq: 1}}){
    edges {
      node {
        id
        name
        username
      }
    }
  }
}
query second {
  author_connection(where: {id: {_eq: 2}}){
    edges {
      node {
        id
        name
        username
      }
    }
  }
}
`}
response={`[
  {
    "data": {
      "author_connection": {
        "edges": [
          {
            "node": {
              "id": "WzEsIHB1YmxpYywgYXV0aG9yLCAxXQo=",
              "name": "Chris",
              "username": "urschris"
            }
          }
        ]
      }
    }
  },
  {
  "data": {
      "author_connection": {
        "edges": [
          {
            "node": {
              "id": "WzEsIHB1YmxpYywgYXV0aG9yLCAyXQo=",
              "name": "Blake",
              "username": "blake99"
            }
          }
        ]
      }
    }
  }
]`}
/>
